﻿#include "dmpch.h"
#include "ImGuiGLFWwindow.h"

#include "DM/Core/Application.h"
#include "DM/Platform/Windows/imgui_impl_glfw.h"

namespace DM
{
	bool ImGuiGLFWwindow::Init()
	{
		Application& app = Application::Get();
		GLFWwindow* window = static_cast<GLFWwindow*>(app.GetWindow().GetNativeWindow());
		return ImGui_ImplGlfw_InitForOpenGL(window, true);
	}

	void ImGuiGLFWwindow::Shutdown()
	{
		ImGui_ImplGlfw_Shutdown();
	}

	void ImGuiGLFWwindow::NewFrame()
	{
		ImGui_ImplGlfw_NewFrame();
	}
}
